{% extends "base.html" %}
{% load djblets_deco %}
{% load i18n %}
{% block title %}{% trans "My Account" %}{% endblock %}

{% block content %}
{% if must_configure %}
{% box "important" %}
<h1>{% trans "Apologies for the interruption, but please read this." %}</h1>
 <p>
  {% trans "Before you can continue to use Review Board, you'll need to set a few things. This will help us get to know each other better." %}
 </p>
 <p>
  {% trans "At a minimum, make sure you have joined one or more groups." %}
 </p>
</div>
{% endbox %}
{% endif %}

<form method="post" action=".">
 {{form.redirect_to}}
{% box "prefsuser" %}
 <h1 class="title">{% trans "User Preferences" %}</h1>
 <div class="main">
  <table>
   {% ifequal siteconfig.settings.auth_backend "builtin" %}
   <tr>
    <td><label for="id_first_name">{% trans "First Name:" %}</label></td>
    <td>{{form.first_name}}</td>
   </tr>
   <tr>
    <td><label for="id_last_name">{% trans "Last Name:" %}</label></td>
    <td>{{form.last_name}}</td>
   </tr>
   <tr>
    <td><label for="id_email">{% trans "Email:" %}</label></td>
    <td>{{form.email}} {{form.errors.email}}</td>
   </tr>
   <tr>
    <td><label for="id_password">{% trans "Change Password:" %}</label></td>
    <td>{{form.password1}}</td>
   </tr>
   <tr>
    <td><label for="id_password2">{% trans "Verify New Password:" %}</label></td>
    <td>{{form.password2}} {{form.errors.password2}}</td>
   </tr>
   {% endifequal %}
{% if siteconfig.settings.diffviewer_syntax_highlighting %}
   <tr>
    <td></td>
    <td>{{form.syntax_highlighting}} {{form.syntax_highlighting.label}}</td>
   </tr>
{% endif %}
  </table>
 </div>
{% endbox %}
{% box "prefsgroup" %}
 <h1 class="title">{% trans "Groups" %}</h1>
 <div class="main">
  <p>{% trans "Which groups do you belong to or wish to watch?" %}</p>
  {{form.groups}}
 </div>
{% endbox %}
 <div class="prefsbuttons">
  <input type="submit" value="{% trans "Save Preferences" %}" />
 </div>
</form>

{% endblock %}
